package com.hodge.web.controller;

import com.hodge.core.base.BaseController;
import com.hodge.core.result.Result;
import com.hodge.web.entity.TabUser;
import com.hodge.web.service.UserInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户信息(UserInfo)表控制层
 *
 * @author haojun
 * @since 2020-03-15 12:54:21
 */
@RestController
@RequestMapping("user")
public class UserInfoController extends BaseController<UserInfoService, TabUser> {

    /**
     * 获取当前登录用户数据
     *
     * @return 单条数据
     */
    @GetMapping("current")
    public Result getCurrent() {
        return Result.withData(this.service.getCurrent());
    }

}